package cn.itcast.mapper;

import cn.itcast.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface IUserMapper {


  @Select("select * from `user` where phone =#{phone}")
  User findByPhoneNum(String phone);

  @Insert("insert into `user` values(null,)")
  void save(User user);

  /**
   * 根据id查询user
   * @param id
   * @return
   */
  @Select("select * from `user` where id =#{id}")
  User findByUserId(Long id);
}
